
//
//  LLBaseTableViewController.swift
//  新浪微博
//
//  Created by mac on 16/5/22.
//  Copyright © 2016年 mac.com. All rights reserved.
//

import UIKit

class LLBaseTableViewController: UITableViewController,LLVisitorLoginViewDelegate {
    //根据用户是否登录显示 登录页面还是访客视图页面
    var userInf = LLUserAccountViewModel.sharedAccountViewModel.userLogin
    lazy var loginView: LLVisitorLoginView = LLVisitorLoginView()
    override func loadView() {
        if userInf{
        
            super.loadView()
        }
        else{
        self.loadVisitorView()
        }

           }
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    

    private func loadVisitorView(){
    view = loginView
        
    loginView.visitorDelegate = self
    
    }
    func userWillRegisiter() {
        print("注册")
    }
    func userWillLogin() {
        print("登录")
        let oauth = LLOAuthViewController()
        let nav = UINavigationController(rootViewController: oauth)
        presentViewController(nav, animated: true, completion: nil)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
}
